package Practice09;

import java.util.ArrayList;
import java.util.Random;

public class Member extends User {
    public Member() {
    }

    public Member(String username, double leftMoney) {
        super(username, leftMoney);
    }

    public void openHongBao(ArrayList<Double> list) {
        Random r = new Random();
        int index = r.nextInt(list.size());
        Double money = list.remove(index);
        System.out.println(money+"=money");
        setLeftMoney(money);
    }


}
